/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: 任静
 * @Date: 2020-11-11 16:18:16
 * @LastEditors: 任静
 * @LastEditTime: 2020-11-13 23:00:47
 */
/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: 任静
 * @Date: 2020-11-11 19:57:59
 * @LastEditors: 任静
 * @LastEditTime: 2020-11-11 21:15:03
 */
import {getClassifly,getClassifyList,getSavePhoto} from '@/api/index'
const state={
   classiflyList:[],
   classiflycontentList:[]
}
const mutations={
    updateClassiflyList(state,payload){
        state.classiflyList=payload
    },
    updateClassiflyContentList(state,payload){
        state.classiflycontentList=payload
    },
    updateSavePhoto(state,payload){
        console.log('savepayload______',payload)
    }
}
const actions={
    async getClassiflyList({commit},payload){
        let res=await getClassifly(payload);
        console.log(res.dataList)
        commit("updateClassiflyList",res.dataList)
    },
    async getClassiflyContentList({commit},payload){
        let res=await getClassifyList(payload);
        console.log(res.dataList)
        commit("updateClassiflyContentList",res.dataList)
    },
    async getSavePhoto({commit},payload){
        console.log('savePhotopayload____',payload)
        let res=await getSavePhoto(payload)
        console.log('savePhoto____',res)
        commit("updateSavePhoto",res)
    }
}
export default{
    namespaced: true,
    state,
    mutations,
    actions
}